home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / python / maclibnx.lha / macdefs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-08-14  |  824 b   |  37 lines

  1. /* Useful #includes and #defines for programming a set of Unix
  2.    look-alike file system access functions on the Macintosh.
  3.    Public domain by Guido van Rossum, CWI, Amsterdam (July 1987).
  4. */
  5.  
  6. #include <Types.h>
  7. #include <Files.h>
  8. #include <OSUtils.h>
  9.  
  10. #include <pascal.h>
  11.  
  12. #include <errno.h>
  13. #include <string.h>
  14.  
  15. /* Difference in origin between Mac and Unix clocks: */
  16. #define TIMEDIFF ((unsigned long) \
  17.     (((1970-1904)*365 + (1970-1904)/4) * 24 * 3600))
  18.  
  19. /* Macro to find out whether we can do HFS-only calls: */
  20. #define FSFCBLen (* (short *) 0x3f6)
  21. #define hfsrunning() (FSFCBLen > 0)
  22.  
  23. /* Universal constants: */
  24. #define MAXPATH 256
  25. #define TRUE 1
  26. #define FALSE 0
  27. #ifndef NULL
  28. #define NULL 0
  29. #endif
  30. #define EOS '\0'
  31. #define SEP ':'
  32.  
  33. #if 0 // doesn't work
  34. /* Call Macsbug: */
  35. pascal void Debugger() extern 0xA9FF;
  36. #endif
  37.